package com.itheima.mybatis03.dao;

import com.itheima.mybatis03.bean.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface StudentMapper {
    @Select("select * from student")
    List<Student> selectAll();
    @Insert("insert into student values(#{sid},#{name},#{age},#{birthday})")
    int insert(Student student);
    @Update("update student set name=#{name},age=#{age} where sid=#{sid}")
    int update(Student student);
    @Delete("delete from student where sid=#{sid}")
    int delete(Integer sid);
}
